package com.zmm.common.dict.enums;

/**
 * @author 900045
 * @description:
 * @name RegionVersion
 * @date By 2021-07-22 20:45:34
 */
public enum RegionVersion {

	V1("1.0"),

	V2("2.0")
	;

	public String version;

	RegionVersion(String version) {
		this.version = version;
	}

	public static RegionVersion fetch(String version) {
		if (version == null) {
			return RegionVersion.V1;
		}
		for (RegionVersion regionVersion : RegionVersion.values()) {
			if (regionVersion.version.equalsIgnoreCase(version)) {
				return regionVersion;
			}
		}
		return RegionVersion.V1;
	}
}
